var onResize = function() {
    // apply dynamic padding at the top of the body according to the fixed navbar height
    var navbarHeight = $(".fixed-top").height()+15;
    var bodyHeight = window.innerHeight - navbarHeight;
    $("body").css("padding-top", navbarHeight);
    $("body").css("padding-bottom", $(".fixed-bottom").height());
    $(".content").css("height", bodyHeight);
};

// attach the function to the window resize event
$(window).resize(onResize);

// call it also when the page is ready after load or reload
$(function() {
    onResize();
});